package com.jt.controller;/**
 * @Author 金帮嘉诚 @Date 2021-07-27 星期二 19:40
 */
/*本类用于测试*/

import com.jt.pojo.User;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**知识点*/
@CrossOrigin
@RestController
@RequestMapping("/user1/")
public class UserController {

    @GetMapping("gA")
    public User getAll(HttpServletRequest request, HttpServletResponse response) {
        String id0 = request.getParameter("id");
        Integer id = Integer.valueOf(id0);
        User user = new User();
        user.setId(id);
        return user;

    }
}
